package stroke
{
	import flash.display.BitmapData;
	import flash.display.CapsStyle;
	import flash.display.Graphics;
	import flash.display.JointStyle;
	import flash.display.Sprite;
	import flash.geom.Rectangle;
	
	import mx.graphics.IStroke;
	
	public class RectStroke implements IStroke
	{
		private static var rectData:BitmapData = createData();
		
		public static function createData():BitmapData
		{
			//5e5c5b, 999999
			var sp:Sprite = new Sprite();
			//one
			sp.graphics.lineStyle(1, 0x5e5c5b);
			sp.graphics.moveTo(0, 0);
			sp.graphics.lineTo(5, 0);
			
			//two
			/*sp.graphics.lineStyle(1, 0x999999);
			sp.graphics.moveTo(0, 1);
			sp.graphics.lineTo(5, 1);
			
			sp.graphics.lineStyle(1, 0x999999);
			sp.graphics.moveTo(0, 3);
			sp.graphics.lineTo(5, 3);*/
			
			sp.graphics.lineStyle(1, 0x5e5c5b);
			sp.graphics.moveTo(0, 4);
			sp.graphics.lineTo(5, 4);
			
			/*sp.graphics.lineStyle(1, 0x5e5c5b);
			sp.graphics.drawRect(0, 0, 4, 4);*/
			
			
			var data:BitmapData = new BitmapData(5, 5, false);
			data.draw(sp);
			return data;
		}
		
		public function RectStroke()
		{
			
		}
		
		public function get weight():Number
		{
			return 5;
		}
		
		public function set weight(value:Number):void
		{
		}
		
		public function get scaleMode():String
		{
			return null;
		}
		
		public function apply(g:Graphics):void
		{
			g.lineStyle(5, 0, 0, true,"normal", CapsStyle.SQUARE, JointStyle.ROUND);
			g.lineBitmapStyle(rectData);
		}
		
		public function draw(g:Graphics, rc:Rectangle):void
		{
			
		}
	}
}